﻿using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Metropolitics.Game_Objects
{
    class TileManager
    {
        #region Members

        private static TileManager instance;
        private Texture2D tileset;
        private uint mapwidth;
        private uint mapheight;
        private uint tilewidth;
        private uint tileheight;
        private uint tilesetwidth;
        private uint tilesetheight;

        private uint[,] ground;
        private uint[,] track;
        private char[,] color;
        private bool[,] passable;

        #endregion

        #region Properties

        public static TileManager GetInstance
        {
            get
            {
                if (instance == null)
                {
                    instance = new TileManager();
                }
                return instance;
            }
        }

        public uint MapWidth
        {
            get
            {
                return mapwidth;
            }
        }

        public uint MapHeight
        {
            get
            {
                return mapheight;
            }
        }

        public uint TileWidth
        {
            get
            {
                return tilewidth;
            }
        }

        public uint TileHeight
        {
            get
            {
                return tileheight;
            }
        }

        public uint TileSetWidth
        {
            get
            {
                return tilesetwidth;
            }
        }

        public uint TileSetHeight
        {
            get
            {
                return tilesetheight;
            }
        }

        #endregion

        #region Functions

        private TileManager()
        {
        }

        public void CreateGrid(uint _width, uint _height)
        {
            track = new uint[_height, _width];
            ground = new uint[_height, _width];
            color = new char[_height, _width];
        }

        public void DestroyGrid(uint _width, uint _height)
        {

        }

        #endregion
    }
}
